<?php

class Damages_Methods_Data_EstimatedBudget {

  /**
   *
   * @var int 
   */
  public $id;

  /**
   *
   * @var Damages_Methods_Data_Attachment 
   */
  public $attachment;

  /**
   *
   * @var float
   */
  public $value;

  /**
   *
   * @var boolean
   */
  public $discountFlag;

  /**
   *
   * @var float
   */
  public $discountValue;

  /**
   *
   * @var float
   */
  public $discountPercentage;

  /**
   *
   * @var float
   */
  public $carValue;

  /**
   *
   * @var float
   */
  public $deductionValue;

  /**
   *
   * @var boolean
   */
  public $isDefault;

  /**
   *
   * @var string 
   */
  public $created;

  /**
   *
   * @var string 
   */
  public $modified;

  public function __construct(DamagesEstimatedBudgets $data) {
    $this->id = $data->getId();
    if ($data->getAttachments())
      $this->attachment = new Damages_Methods_Data_Attachment($data->getAttachments());
    $this->value = $data->getValue();
    $this->discountFlag = (int) $data->getDiscountFlag();
    $this->discountValue = $data->getDiscountValue();
    $this->discountPercentage = $data->getDiscountPercentage();
    $this->carValue = $data->getCarValue();
    $this->deductionValue = $data->getDeductionValue();
    $this->isDefault = (int) $data->getIsDefault();
    $this->created = $data->getCreated();
    $this->modified = $data->getModified();
  }

}